@use "index";
@use "transition";

/* 自定义日历表的样式 */
.el-calendar-table__row {
  @extend .use-transitions-colors !optional;

  .el-calendar-day {
    height: 40px;
  }
}

.el-calendar-table thead th {
  padding: 0 0 10px 0;
  text-align: center;
  @extend .use-transitions-colors !optional;
}

/* 自定义表格样式 */
.el-table, th.el-table__cell {
  @extend .use-theme !optional;
  @extend .use-transitions-colors !optional;

  tr, th.el-table__cell, td.el-table__cell {
    background-color: transparent !important;
  }

  tr.el-table__row {
    @extend .use-hover-bg !optional;
    @extend .use-transitions-colors-short !optional;
  }

  .cell {
    display: flex;
    word-break: break-word;
    align-items: center !important;
  }
}

/* 自定义 弹窗样式 */
.el-dialog {
  @extend .use-radius !optional;
  @extend .use-second-bg !optional;
  @extend .use-transitions-shadow-short !optional;

  @media screen and (max-width: 1024px) {
    max-width: calc(100vw - 40px);
  }
}

.el-overlay .el-overlay-dialog {
  scrollbar-width: none;
  scroll-behavior: smooth;

  .el-dialog__header {
    display: none;
  }
}

/* 自定义 单选框组 */
.el-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;

  .el-checkbox {
    margin: 0;
    @extend .use-font-theme !optional;
  }

  .el-checkbox__label {
    padding: 0 0 0 5px;
  }
}


.el-radio-group {
  gap: 0 10px;

  .el-radio {
    margin: 0;
    @extend .use-font-theme !optional;
  }

  .el-radio__label {
    padding: 0 0 0 5px;
  }
}

/* 自定义 表单 label */
.el-form-item {
  margin-right: 20px !important;
}

.el-form-item__label {
  padding: 0 5px 0 0;
  @extend .use-font-theme !optional;
}

/* 自定义 标签页 */
.el-tabs {
  .el-tabs__nav {
    width: 100% !important;
    border: none !important;
    padding: 3px 20px !important;
    display: flex;
    justify-content: center;
  }

  .el-tabs__header,
  .el-tabs__item {
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* 自定义下拉框 */
// 清除下拉框边框
.dropdown, .el-popper {

  &:focus-visible {
    outline: unset;
  }

  :deep(*) {
    outline: unset !important;
    border: none !important;
  }
}

.el-popper {
  border: none !important;
  @extend .use-third-bg !optional;
  @extend .use-radius-sm !optional;

  .el-scrollbar {
    width: 100% !important;
    text-align: center !important;
    @extend .use-radius-sm !optional;

    .el-select-dropdown__list {
      padding: 0 !important;
    }
  }

  .el-select-dropdown__item, .el-select-dropdown__item.is-hovering {
    @extend .use-hover-bg !optional;
    @extend .use-font-theme !optional;
    padding: 0 15px;
    background-color: transparent;
  }

  // 箭头
  .el-popper__arrow {
    @extend .use-third-bg !optional;

    width: 1.6rem !important;
    height: 1.6rem !important;
    transform: rotateZ(45deg) !important;

    &:before, &:after {
      display: none !important;
    }

  }
}

/* 自定义 mdv3 中的图片样式 */
div.default-theme div {
  display: flex;
  flex-direction: row;
  justify-content: center;
  column-gap: 20px;
}

div.default-theme img {
  display: inline;
  padding: 0;
  border: none;
  border-radius: 10px;
  margin: 15px auto;
  height: fit-content !important;
}

div.default-theme span {
  width: auto;
  margin: 5px auto;
}

@media screen and (max-width: 678px) {
  div.default-theme div {
    flex-wrap: wrap;
  }
  div.default-theme span {
    margin: 0 auto;
  }
  div.default-theme img {
    width: 100%;
  }
}